package binary;/**
 * @author ZH
 */

import lombok.Getter;

@Getter
public enum UserEnum {
    /**
     * 测试
     */
    WEB(0, "WEB"),
    APP(1, "APP"),
    MANGE(2, "MANGE");

    public static String getMsgByCode(Integer code) {
        if (null != code) {
            for (UserEnum typeEnum : UserEnum.values()) {
                if (typeEnum.getCode().equals(code)) {
                    return typeEnum.getMsg();
                }
            }
        }
        return null;
    }

    UserEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private final Integer code;

    private final String msg;
}
